<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of maskEllipse</title>
  <meta name="keywords" content="maskEllipse">
  <meta name="description" content="Creates a binary image of an ellipse.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html images -->
<h1>maskEllipse
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Creates a binary image of an ellipse.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function mask = maskEllipse( mRows, nCols, varargin ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Creates a binary image of an ellipse.

 Creates a binary image of size (mRows x nCols), with all pixels set to 0
 outside the ellipse and 1 inside.  The ellipse is given by 5 parameters,
 a semimajor axis of ra, a semminor axis of radius rb, angle phi (in
 radians), and center (cRow,cCol). An alternative method of specifying the
 ellipse parameters is in terms of a 2D Gaussian. For more info on how a
 Gaussian relates to an ellipse see gauss2ellipse.

 USAGE
  mask = maskEllipse( mRows, nCols, cRow, cCol, ra, rb, phi )
  mask = maskEllipse( mRows, nCols, mu, C, [rad] )

 INPUTS [version 1]
  mRows   - number of rows in mask
  nCols   - number of columns in mask
  cRow    - the row location of the center of the ellipse
  cCol    - the column location of the center of the ellipse
  ra      - semi-major axis length (in pixels) of the ellipse
  rb      - semi-minor axis length (in pixels) of the ellipse
  phi     - rotation angle (in radians) of semimajor axis to x-axis

 INPUTS [version 2]
  mRows   - number of rows in mask
  nCols   - number of columns in mask
  mu      - 1x2 vector representing the center of the ellipse
  C       - 2x2 cov matrix
  rad     - [2] Number of std to create the ellipse to

 OUTPUTS
  mask    - created image mask

 EXAMPLE
  mask = maskEllipse(  200, 200, 40, 100,  20, 15, pi/4 );
  figure(1); im(mask); [mu,C] = imMlGauss( mask, 0, 2 );

 See also PLOTELLIPSE, GAUSS2ELLIPSE, <a href="maskCircle.html" class="code" title="function mask = maskCircle( angleStart, angleSiz, r, nSamples )">MASKCIRCLE</a>, <a href="maskGaussians.html" class="code" title="function [masks,keepLocs] = maskGaussians( siz, M, width, offset, show )">MASKGAUSSIANS</a>, <a href="imMlGauss.html" class="code" title="function varargout = imMlGauss( G, symmFlag, show )">IMMLGAUSS</a>

 Piotr's Computer Vision Matlab Toolbox      Version 2.40
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]</pre></div>





<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
